package test3;

import java.util.Arrays;
import java.util.List;

/**
 * @PackageName: test3
 * @ClassName: Test1
 * @Author: chen jinxu
 * @Date: 2021/9/13 21:58
 * @Description: //TODO
 */
public class Test1 {
    public static void main(String[] args) {
        String s = "Let's take LeetCode2104 contest";
        String[] str_array = s.split(" ");
        StringBuilder sb = new StringBuilder();
        for (String s1 : str_array) {
            char[] chars = s1.toCharArray();
            int length = chars.length;
            for(int i = 0; i < length/2 ; i ++){
                 char tmp = chars[i];
                 chars[i] = chars[length -1 - i];
                 chars[length - 1 -i] = tmp;
             }
            sb.append(String.valueOf(chars)).append(' ');
        }
        System.out.println(sb.toString().trim());
        }

    }
